
export default {
  songInfo(state) {
    if (state.musicPlace != -1){
      return { 
        name: state.musicList[state.musicPlace].name,
        singer: state.musicList[state.musicPlace].singer,
        coverUrl:state.musicList[state.musicPlace].coverUrl?state.musicList[state.musicPlace].coverUrl:"",
      }
    }
    else {
      return {
        name:'',
        singer:'',
        coverUrl:'',
      }
    }
    
  },
  //存储播放，暂停按钮的样式class
  playBtnClass(state) {
    if (state.playState === true) {
      return 'pause_button'
    } else {
      return 'play_button'
    }
  },
  getList(state) {
    if (state.musicList.length == 0) {
      return []
    } else {
      return state.musicList
    }
  },
  getListState(state) {
    return state.listState
  },
  getMusicPlace(state) {
    return state.musicPlace
  },
  nowSong(state) {
    if (state.musicPlace == -1) {
      return { songid: -1, name: '', singer: '-' }
    } else {
      return state.musicList[state.musicPlace]
    }
  },
  currentTime(state) {
    return state.currentTime
  },
  duration(state) {
    return state.duration
  },
  getLyricsArr(state){
    return state.lyricsArr
  },
  getUserInfo(state){
    return state.userInfo
  },
  getPlayState(state){
    return state.playState;
  },
  getThemeDark(state){   
    return state.is_theme_dark;
  },
  getVolume(state){
    return state.volume;
  },
  getSingerPoster(state){
    return state.singerPoster;
  },
  getManageState(state){
    return state.manageState;
  },
  getBottomBarState(state){
    return state.bottomBarState;
  },
  getPageGradation(state){
    return state.pageGradation;
  },

}
